/* 
 * -----------------------------------------------------------------
 * This is the basic graphics interface that takes charge of drawing
 * images, pixels, line, rectangle and such visual things. 
 * 2011, by Wu Mu Xian
 * ------------------------------------------------------------
*/

package mygame.basicgameframework;

public interface Graphics {
	// the pixel map formats
	public static enum PixmapFormat {
		ARGB8888, ARGB4444, RGB565
	}
	
	// create a new pixel map
	public Pixelmap newPixelmap(String fileName, PixmapFormat format);
	
	// clear the frame buffer
	public void clear(int color);
	
	// draw a text
	public void drawText(String string, int position, int fontsize);
	
	// draw a pixel
	public void drawPixel(int x, int y, int color);
	
	// draw a line
	public void drawLine(int x, int y, int x2, int y2, int color);
	
	// draw a rectangle
	public void drawRect(int x, int y, int width, int height, int color);
	
	// draw a certain part of a pixel map
	public void drawPixelmap(Pixelmap pixmap, int x, int y, int srcX, int srcY,
            int srcWidth, int srcHeight);
	
	// draw a pixel map to a certain area
	public void drawPixelmap(Pixelmap pixmap, int x, int y, int disWidth, int disHeight);
	
	// draw a pixel map
	public void drawPixelmap(Pixelmap pixmap, int x, int y);
	
	// get the width of the frame buffer
	public int getWidth();
	
	// get the height of the frame buffer
	public int getHeight();
}
